package com.yudaxian.bi.controller;

import cn.dev33.satoken.annotation.SaCheckRole;
import cn.hutool.json.JSONArray;
import com.yudaxian.bi.model.enums.UserRoleEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: yudaxian
 * @Description: test
 * @DateTime: 2024/9/16 11:38
 **/
@RestController
@RequestMapping("/test")
@Api(tags = "测试")
public class TestController {

    @GetMapping("/user")
    @ApiOperation(value = "测试接口user")
    @SaCheckRole("user")
    public String test1() {
        return "test user";
    }

    @GetMapping("/admin")
    @ApiOperation(value = "测试接口admin")
    @SaCheckRole("admin")
    public String test2() {
        return "test admin";
    }

}
